package com.xyyhome.web.love.domain;

import javax.persistence.*;

/**
 * Created by ty850 on 2017/5/21.
 */
@Entity
@Table(name = "y_l_dynamic_attachment", schema = "xyyhome", catalog = "")
public class YLDynamicAttachment {
    private String yldaId;
    private String yldaDynamicId;
    private String yldaAttachmentId;
    private Byte yldaState;

    @Id
    @Column(name = "ylda_id", nullable = false, length = 36)
    public String getYldaId() {
        return yldaId;
    }

    public void setYldaId(String yldaId) {
        this.yldaId = yldaId;
    }

    @Basic
    @Column(name = "ylda_dynamic_id", nullable = true, length = 36)
    public String getYldaDynamicId() {
        return yldaDynamicId;
    }

    public void setYldaDynamicId(String yldaDynamicId) {
        this.yldaDynamicId = yldaDynamicId;
    }

    @Basic
    @Column(name = "ylda_attachment_id", nullable = true, length = 36)
    public String getYldaAttachmentId() {
        return yldaAttachmentId;
    }

    public void setYldaAttachmentId(String yldaAttachmentId) {
        this.yldaAttachmentId = yldaAttachmentId;
    }

    @Basic
    @Column(name = "ylda_state", nullable = true)
    public Byte getYldaState() {
        return yldaState;
    }

    public void setYldaState(Byte yldaState) {
        this.yldaState = yldaState;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        YLDynamicAttachment that = (YLDynamicAttachment) o;

        if (yldaId != null ? !yldaId.equals(that.yldaId) : that.yldaId != null) return false;
        if (yldaDynamicId != null ? !yldaDynamicId.equals(that.yldaDynamicId) : that.yldaDynamicId != null)
            return false;
        if (yldaAttachmentId != null ? !yldaAttachmentId.equals(that.yldaAttachmentId) : that.yldaAttachmentId != null)
            return false;
        if (yldaState != null ? !yldaState.equals(that.yldaState) : that.yldaState != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = yldaId != null ? yldaId.hashCode() : 0;
        result = 31 * result + (yldaDynamicId != null ? yldaDynamicId.hashCode() : 0);
        result = 31 * result + (yldaAttachmentId != null ? yldaAttachmentId.hashCode() : 0);
        result = 31 * result + (yldaState != null ? yldaState.hashCode() : 0);
        return result;
    }
}
